package com.inspectortime.webapp;

import com.inspectortime.domain.HomeBuyer;
import com.inspectortime.domain.Inspection;
import com.inspectortime.domain.InspectorCompany;
import com.inspectortime.domain.RealEstateAgent;

/**
 * Simple form bean used for binding form fields
 * to the Inspection object and it' related attributes
 * 
 * Used in the Schedule wizard and "Add/Edit Inspection" functionality
 * 
 * @author bones
 *
 */
public class InspectionCriteria {
	
	/**
	 * The main inspection object where most of the binding takes place
	 */
	private Inspection inspection;
	
	/**
	 * The optional second home buyer information.  If this is populated, then
	 * we'll manually add it to the Inspection object.  This manual solution
	 * gets around the issue where we have to prepopulate the object in the Inspection
	 * to bind it to the form, and it leads to an empty object being
	 * persisted
	 */
	private HomeBuyer secondHomeBuyer; 
	/**
	 * For adding/editing the optional referring real estate agent.  If populated,
	 * we'll manually add it to the Inspection object.  See secondHomeBuyer
	 * comments for why we do it this way
	 */
	private RealEstateAgent referringRealEstateAgent;
	/**
	 * On Add/Edit Inspection, indicates that user is choosing to add a new referring realtor
	 */
	private String addRealtorInfo;
	/**
	 * The value of the auto-populating referring realtor textfield 
	 */
	private String selectedRealtor;
	/**
	 * Value of the referring realtor dropdown, which is used as a replacement to the auto-populating field
	 * in non-javascript enabled browsers
	 */
	private String referringAgentId;
	/**
	 * In schedule wizard, the value of the  checkbox indicating what type of 
	 * Referring realtor information is being input ("Add new", "select from existing", etc)
	 */
	private String referringRealtorInputType;
	
	/**
	 * Indicates whether or not to send a confirmation email to the buyer
	 * (applies to the Add/Edit Inspection page only)
	 */
	private boolean sendEmailToBuyer;
	
	/**
	 * Indicates whether or not to send a confirmation email to the inspector
	 * (applies to the Add/Edit Inspection page only)
	 */
	private boolean sendEmailToInspector;
	
	/**
	 * Indicates whether or not to send a thank you email to the realtor
	 * (applies to the Add/Edit Inspection page only)
	 */
	private boolean sendEmailToRealtor;
	
	private InspectorCompany inspectorCompany;
	
	public InspectorCompany getInspectorCompany() {
		return inspectorCompany;
	}
	public void setInspectorCompany(InspectorCompany inspectorCompany) {
		this.inspectorCompany = inspectorCompany;
	}
	public Inspection getInspection() {
		return inspection;
	}
	public void setInspection(Inspection inspection) {
		this.inspection = inspection;
	}
	public RealEstateAgent getReferringRealEstateAgent() {
		return referringRealEstateAgent;
	}
	public void setReferringRealEstateAgent(RealEstateAgent referringRealEstateAgent) {
		this.referringRealEstateAgent = referringRealEstateAgent;
	}
	public String getAddRealtorInfo() {
		return addRealtorInfo;
	}
	public void setAddRealtorInfo(String addRealtorInfo) {
		this.addRealtorInfo = addRealtorInfo;
	}
	public String getSelectedRealtor() {
		return selectedRealtor;
	}
	public void setSelectedRealtor(String selectedRealtor) {
		this.selectedRealtor = selectedRealtor;
	}
	public String getReferringAgentId() {
		return referringAgentId;
	}
	public void setReferringAgentId(String referringAgentId) {
		this.referringAgentId = referringAgentId;
	}
	public String getReferringRealtorInputType() {
		return referringRealtorInputType;
	}
	public void setReferringRealtorInputType(String referringRealtorInputType) {
		this.referringRealtorInputType = referringRealtorInputType;
	}
	public HomeBuyer getSecondHomeBuyer() {
		return secondHomeBuyer;
	}
	public void setSecondHomeBuyer(HomeBuyer secondHomeBuyer) {
		this.secondHomeBuyer = secondHomeBuyer;
	}
	public boolean isSendEmailToBuyer() {
		return sendEmailToBuyer;
	}
	public void setSendEmailToBuyer(boolean sendEmailToBuyer) {
		this.sendEmailToBuyer = sendEmailToBuyer;
	}
	public boolean isSendEmailToInspector() {
		return sendEmailToInspector;
	}
	public void setSendEmailToInspector(boolean sendEmailToInspector) {
		this.sendEmailToInspector = sendEmailToInspector;
	}
	public boolean isSendEmailToRealtor() {
		return sendEmailToRealtor;
	}
	public void setSendEmailToRealtor(boolean sendEmailToRealtor) {
		this.sendEmailToRealtor = sendEmailToRealtor;
	}
}
